package com.spring.nio.core.http;

import lombok.Data;

/**
 * @author: spring
 * @Date: 2019/9/7 16:02
 * @Pacage_name: com.spring.nio.core.http
 * @Project_Name: nio-client
 * @Description:    Http请求类
 */
@Data
public class HttpRequest extends HttpContext {

    private String requestHeader;

    private String bodyData;

    private HeaderEntry headerEntry;

    private HttpRequest() {
    }

    public static HttpRequest getInstance() {
        HttpRequest httpRequest = new HttpRequest();
        httpRequest.setHeaderEntry(new HeaderEntry());
        return httpRequest;
    }

    @Override
    public String toString() {
        return "HttpRequest{" +
            "requestHeader='" + requestHeader + '\'' +
            ", bodyData='" + bodyData + '\'' +
            ", headerEntry=" + headerEntry +
            '}';
    }
}
